#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	int mi1 = min(a, c);
	int mi2 = min(b, d);
	long long ans = (long long)mi1 * mi2;
	cout << ans << endl;
	return 0;
}